package com.example.gaohongwei.myfirstapp;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class DisplayMessageActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_display_message);

        Intent intent = getIntent();
        String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);

        TextView textView = findViewById(R.id.textView);
        textView.setText(message);

       // Button button =


    }
    int size = 30;
    public void bigger(View view){
        TextView textView ;
        textView = findViewById(R.id.textView);
        textView.setTextSize(++size);
    }
    public void smaller(View view){
        if(size > 30){
            TextView textView ;
            textView = findViewById(R.id.textView);
            textView.setTextSize(--size);

        }}



}
